//
//  UIView+Util.m
//
//  Created by SKY
//  Copyright © 翊sky. All rights reserved.
//

#import "UIView+Util.h"

@implementation UIView (Util)

- (void)setBorderWidth:(CGFloat)width borderColor:(UIColor *)color {
    self.layer.borderColor = color.CGColor;
    self.layer.borderWidth = width;
}

- (void)setCornerRadius:(CGFloat)cornerRadius {
    self.layer.cornerRadius = cornerRadius;
    self.layer.masksToBounds = YES;
}

- (void)changeFrameX:(CGFloat)x {
    
    CGRect frame = self.frame;
    frame.origin.x = x;
    self.frame = frame;
    
}

- (void)changeFrameY:(CGFloat)y {
    
    CGRect frame = self.frame;
    frame.origin.y = y;
    self.frame = frame;
    
}

- (void)changeFrameW:(CGFloat)w {
    
    CGRect frame = self.frame;
    frame.size.width = w;
    self.frame = frame;
    
}

- (void)changeFrameH:(CGFloat)h {
    
    CGRect frame = self.frame;
    frame.size.height = h;
    self.frame = frame;
    
}
@end
